load(key).

use_package(hypspc).
minimal_cases(2).
accuracy(0.80).
random_test_set(0.1).

classes([pos,neg]).
predict(creditscreening(+persona,-cl)).


rmode(1: purchaseitem(+Persona,-Item)).
rmode(1: age(+Persona,-Number)).
rmode(1: deposit(+Persona,-Number)).
rmode(1: monthlypayment(+Persona,-Number)).
rmode(1: numbofmonths(+Persona,-Number)).
rmode(1: numbyearscompany(+Persona,-Number)).
rmode(1: purchaseitem(+Persona,#)).





typed_language(yes).

type(purchaseitem(persona,item)).
type(age(persona,number)).
type(deposit(persona,number)).
type(monthlypayment(persona,number)).
type(numbofmonths(persona,number)).
type(numbyearscompany(persona,number)).


type(number =< number).
type(number >= number).


auto_lookahead(age(Persona,Number),[Number]).
auto_lookahead(deposit(Persona,Number),[Number]).
auto_lookahead(monthlypayment(Persona,Number),[Number]).
auto_lookahead(numbofmonths(Persona,Number),[Number]).
auto_lookahead(numbyearscompany(Persona,Number),[Number]).

discretize(entropy).

discretization(bounds(4)).

to_be_discretized(age(Example,Number),[Number]).
rmode(1: #(C:threshold(age(_, Number), [Number], C), +Number >= C)).
rmode(1: #(C:threshold(age(_, Number), [Number], C),+Number =< C)).

discretization(bounds(4)).
to_be_discretized(deposit(Example,Number),[Number]).
rmode(1: #(C:threshold(deposit(_, Number), [Number], C), +Number >= C)).
rmode(1: #(C:threshold(deposit(_, Number), [Number], C),+Number =< C)).

discretization(bounds(4)).
to_be_discretized(monthlypayment(Example,Number),[Number]).
rmode(1: #(C:threshold(monthlypayment(_, Number), [Number], C), +Number >= C)).
rmode(1: #(C:threshold(monthlypayment(_, Number), [Number], C),+Number =< C)).


discretization(bounds(4)).
to_be_discretized(numbofmonths(Example,Number),[Number]).
rmode(1: #(C:threshold(numbofmonths(_, Number), [Number], C), +Number >= C)).
rmode(1: #(C:threshold(numbofmonths(_, Number), [Number], C),+Number =< C)).


discretization(bounds(4)).
to_be_discretized(numbyearscompany(Example,Number),[Number]).
rmode(1: #(C:threshold(numbyearscompany(_, Number), [Number], C), +Number >= C)).
rmode(1: #(C:threshold(numbyearscompany(_, Number), [Number], C),+Number =< C)).










